//
//  TextInputView.h
//  RainbowFM
//
//  Created by Kratos on 14/12/14.
//  Copyright (c) 2014年 RB. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "VoiceManage.h"

@class TextInputView;
@protocol TextInputViewDelegate <NSObject>
@optional
-(void)textSended:(NSString *)text view:(TextInputView *)view;
-(void)imageSendedWithImage:(UIImage *)image imageData:(NSData *)imageData view:(TextInputView *)view;
-(void)voiceSendedWithVoiceData:(NSData *)voiceData view:(TextInputView *)view;
@end

@interface TextInputView : UIView <UITextFieldDelegate,UIActionSheetDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,VoiceManageDelegate>
//@property (nonatomic , weak) IBOutlet UIButton *sendBtn;//发送按钮
@property (nonatomic , weak) IBOutlet UITextField *contentTextView;
@property (nonatomic , weak) IBOutlet UIImageView *textBG;

@property (nonatomic , weak) IBOutlet UIButton *changeVoiceBtn;//切换声音按钮
@property (nonatomic , weak) IBOutlet UIButton *changeTxtBtn;//切换文字按钮

@property (nonatomic , weak) IBOutlet UIButton *sendImageBtn;//发送图片按钮
@property (nonatomic , weak) IBOutlet UIButton *sendVoiceBtn;//发送图片按钮

@property (nonatomic , weak) id<TextInputViewDelegate> delegate;
@property (nonatomic , strong) VoiceManage *manage;
@property (nonatomic , assign) NSInteger mode;//0 为文字，1为语言

-(IBAction)sendImage:(id)sender;
-(IBAction)exchangeVoice:(id)sender;
-(IBAction)exchangeText:(id)sender;
@end
